import { Column, Entity, Index, PrimaryGeneratedColumn } from "typeorm";

@Index("PK__sys_menu__3213E83FC262E94C", ["id"], { unique: true })
@Entity("sys_menu", { schema: "dbo" })
export class SysMenu {
  @Column("int", { name: "parent_id" })
  parentId: number;

  @Column("nvarchar", { name: "tree_path", nullable: true, length: 255 })
  treePath: string | null;

  @Column("nvarchar", { name: "name", length: 64 })
  name: string;

  @Column("varchar", { name: "type", length: 255 })
  type: string;

  @Column("nvarchar", { name: "path", nullable: true, length: 128 })
  path: string | null;

  @Column("nvarchar", { name: "component", nullable: true, length: 128 })
  component: string | null;

  @Column("nvarchar", { name: "perm", nullable: true, length: 128 })
  perm: string | null;

  @Column("tinyint", { name: "visible" })
  visible: number;

  @Column("int", { name: "sort", nullable: true })
  sort: number | null;

  @Column("nvarchar", { name: "icon", nullable: true, length: 64 })
  icon: string | null;

  @Column("nvarchar", { name: "redirect", nullable: true, length: 128 })
  redirect: string | null;

  @Column("tinyint", { name: "always_show", nullable: true })
  alwaysShow: number | null;

  @Column("tinyint", { name: "keep_alive", nullable: true })
  keepAlive: number | null;

  @Column("datetime2", { name: "create_time", nullable: true })
  createTime: Date | null;

  @Column("datetime2", { name: "update_time", nullable: true })
  updateTime: Date | null;

  @Column("bigint", { name: "create_by", nullable: true })
  createBy: string | null;

  @Column("bigint", { name: "update_by", nullable: true })
  updateBy: string | null;

  @Column("datetime2", { name: "delete_time", nullable: true })
  deleteTime: Date | null;

  @Column("nvarchar", { name: "create_user", nullable: true, length: 255 })
  createUser: string | null;

  @Column("nvarchar", { name: "update_user", nullable: true, length: 255 })
  updateUser: string | null;

  @PrimaryGeneratedColumn({ type: "bigint", name: "id" })
  id: string;
}
